Strict 
Import agfx

' From James Boyd
Class TTimer


	Field _timer:Float
	Field _stop:Bool = False
	Field seconds:Float = 0.0
	
	Method New ()		
		Self._timer = 0.0
	End
	
	Method Update:Void()
	
		If Self._stop Then Return
		
		Self._timer += AppSpeed()
		Self.seconds = (Self._timer/100.0)		
	End

	Method GetSecondsFromStart:Float()
		Return Self.seconds
	End Method

	Method ResetSecondsCounter:Void()
		Self.seconds = 0.0
		Self._timer = 0.0
	End Method

	
	Method Stop:Void()
		Self._stop = True
	End
	Method Resume:Void()
		Self._stop = False
	End
	
End

